<{include file="public/header.html"}> 
	<!--问答 首页-->
	<header class="title-fixed w100 border-bottom-sm">
            <div class="title bj-white">
                <a href="<{eval url('wenda/asking')}>" class="title-top title-left col-red col-red" id="btn-back">上一步</a>
                <a href="javascript:;" class="title-right title-text col-red" id="btn-complete">完成</a>
                    <h1 class="text-center name">选择问答标签</h1>
            </div>
	</header>
	<div class="mt50 wd-label">
            <div class="ptb10 border-bottom-lg">
                <p class="text-center font12 col-grey666">添准确的标签，可快速获得回答</p>
            </div>
            <div style="padding: 0 40px;">
                <ul id="wenda-tags">
                    <{foreach from=$tags item=val}>
                    <li <{if !$is_recommend}>class="active"<{/if}> data-name="<{$val['name']}>" data-tid="<{$val['id']}>"><{$val['name']}></li>
                    <{/foreach}>
                </ul>
                <button class="publicText fl col-red" id="add-tags-btn">+手动添加</button>
            </div>
	</div>
	
	<!--输入框 弹窗-->
	<div class="publick-jq1 disnone tag-content-box">
            <div class="public-field-text w100 bj-white tag-content-box" style="bottom: 0;height: auto;top: inherit;">
                <div class="text-list plr10 ptb5 border a-label">
                    <textarea id="tag-content" name=""  class="w80" placeholder="搜索标签"></textarea>
                    <button class="close-text close-jq fr _close">取&nbsp;消</button>
                </div>
                <div class="add-label f-cb disnone" id="wrapper-label">
                    <ul class="f-cb">
                    </ul>
                    <span class="disnone"></span>
                </div>
            </div>
	</div>
        <script type="text/javascript" src="/static/js/wenda-min-1.0.js"></script>
        <script type="text/javascript" src="/static/js/iscroll/iscroll.js"></script>
        <script type="text/javascript">
            $(function(){
//                var Scroll = new iScroll('wrapper-label',{hScrollbar:false, vScrollbar:false});
                $("#btn-complete").asking_complete();
                $("#btn-back").on("click",function(){
                    var _tags = check_tags($("#wenda-tags"));
                    if(_tags == ""){
                        window.location.href = "/wenda/asking";
                    }
                    doRequest("/wenda/asking_tags",{tags:_tags},true,function(data){
                        window.location.href = "/wenda/asking";
                    },function(data){});
                });
            });
    </script>
<{include file="public/footer.html"}> 

